export default {
	install(Vue, options) {
		Vue.directive('preview', {
			bind: function(el, binding, vnode) {
        el.addEventListener('click', clickHandler);
        function clickHandler() {
          console.log(2)
          // let PreviewTpl = Vue.extend({
          //     template: ' <img src=" ' + el.src + '"/>'
          // });
          // let tpl = new PreviewTpl().$mount().$el;
          // document.body.appendChild(tpl);
        }
			},
      update: function() {
        //

      },
      unbind: function() {
        //
      }

		})
    Vue.prototype.$console = function (options) {
      console.log(options)
    }
	}
}
